package com.lmy.mallback.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lmy.mallback.util.CustomDateTimeSerializer;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.time.LocalDateTime;
import java.util.Date;

@TableName("t_admin")
@Data
public class Admin {

    @TableId(type = IdType.AUTO)
    private Integer id; // 编号

    private String userName; // 用户名

    private String password; // 密码

    private String name; // 密码

    private String email;

    @JsonSerialize(using= CustomDateTimeSerializer.class)
    private Date createTime;

    @TableField(select = false)
    private String newPassword; // 新密码
}